package com.zzptc.sky.baidudemo.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.zzptc.sky.baidudemo.vo.BaiBoxInfo;
import com.zzptc.sky.baidudemo.vo.MobileInfo;

import com.zzptc.sky.baidudemo.db.BaiBoxInfoDao;
import com.zzptc.sky.baidudemo.db.MobileInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig baiBoxInfoDaoConfig;
    private final DaoConfig mobileInfoDaoConfig;

    private final BaiBoxInfoDao baiBoxInfoDao;
    private final MobileInfoDao mobileInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        baiBoxInfoDaoConfig = daoConfigMap.get(BaiBoxInfoDao.class).clone();
        baiBoxInfoDaoConfig.initIdentityScope(type);

        mobileInfoDaoConfig = daoConfigMap.get(MobileInfoDao.class).clone();
        mobileInfoDaoConfig.initIdentityScope(type);

        baiBoxInfoDao = new BaiBoxInfoDao(baiBoxInfoDaoConfig, this);
        mobileInfoDao = new MobileInfoDao(mobileInfoDaoConfig, this);

        registerDao(BaiBoxInfo.class, baiBoxInfoDao);
        registerDao(MobileInfo.class, mobileInfoDao);
    }
    
    public void clear() {
        baiBoxInfoDaoConfig.clearIdentityScope();
        mobileInfoDaoConfig.clearIdentityScope();
    }

    public BaiBoxInfoDao getBaiBoxInfoDao() {
        return baiBoxInfoDao;
    }

    public MobileInfoDao getMobileInfoDao() {
        return mobileInfoDao;
    }

}
